<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>系统登录 - 超市账单管理系统</title>
<link type="text/css" rel="stylesheet" href="css/style.css" />
<script type="text/javascript">
	function submitForm() {
		var loginName = $("#loginName").val();
		var loginPwd = $("#loginPwd").val();
		if (loginName == null || loginName == "") {
			$("#loginNameSpan").html("登录名不能为空！");
			return false;
		} else {
			$("#loginNameSpan").html("");
		}
		if (loginPwd == null || loginPwd == "") {
			$("#passwordSpan").html("密码不能为空！");
			return false;
		} else {
			$("#passwordSpan").html("");
		}
		$('#myForm').submit();
	}
</script>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
</head>
<body class="blue-style">
	<div id="login">
		<div class="icon"></div>
		<div class="login-box">
			<form action="UserServlet" name="myForm" id="myForm" method="post">
				<input type="hidden" name="flag" value="login" />
				<dl>
					<dt>用户名：</dt>
					<dd>
						<input type="text" name="loginName" id="loginName"
							class="input-text" /> <span id="loginNameSpan">
							<c:if test="${msg!=null }">
								<script>
								alert('${msg}');
								</script>
							</c:if>
							</span>
					</dd>
					<dt>密 码：</dt>
					<dd>
						<input type="password" name="loginPwd" id="loginPwd"
							class="input-text" /><span id="passwordSpan"></span>
					</dd>
				</dl>
				<div class="buttons">
					<input type="button" value="登录系统" class="input-button"
						onclick="submitForm()" /> <input type="reset" value="重　　填"
						class="input-button" />
				</div>
			</form>
		</div>
	</div>
</body>
</html>